﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo01
{
    class Program
    {
        static void Main(string[] args)
        {
            Plane plane = new Plane("乐迪");
            plane.GetType();
            i(plane);
            Console.WriteLine();

            Bird bird = new Bird("小鸟");
            i(bird);
            a(bird);
            bird.LayEggs();
            Console.WriteLine();

            Superman superman = new Superman("超人");
            i(superman);
            a(superman);

            Console.ReadLine();

        }
        public static void i(IFlyable i)
        {
            i.TakeOff();
            i.Fly();
            i.Land();
        }
        public static void a(Animal a)
        {
            a.Eat();
        }

    }
}
